#pragma once

#include <string>

#include <rtc_base/socket_address.h>

#include "ice/ice_def.h"

namespace xrtc {

class Candidate {
public:
    uint32_t get_priority(uint32_t type_preference, int network_adapter_preference, int replay_preference);
    std::string to_string() const;

public:
    IceCandidateComponent m_component; // component: rtp/rtcp 
    std::string m_protocol;
    rtc::SocketAddress m_address;
    int m_port = 0;
    uint32_t m_priority = 0;
    std::string m_username;
    std::string m_password;
    std::string m_type; // candidate的类型（host、srflx、prflx、relay）
    std::string m_foundation;
}; 

}